FROM registry.cn-shenzhen.aliyuncs.com/edana/atlassian-agent:1.3.1

ENV JVM_MINIMUM_MEMORY=512m
ENV JVM_MAXIMUM_MEMORY=1024m
ENV PROXY_ENABLED=false
ENV PROXY_SCHEME=
ENV PROXY_NAME=
ENV PROXY_PORT=

WORKDIR ${ATLASSIAN_INSTALL_DIR}

ADD atlassian-crowd-4.3.5.tar.gz .
RUN mv atlassian-crowd-4.3.5 crowd; \
        echo  "\ncrowd.home=$ATLASSIAN_HOME/crowd" >> $ATLASSIAN_INSTALL_DIR/crowd/crowd-webapp/WEB-INF/classes/crowd-init.properties; \
        mkdir -p "$ATLASSIAN_HOME/crowd";


COPY conf conf
COPY crowd-init.sh /docker-entrypoint-init.d

EXPOSE 8095

CMD ["/bin/bash", "./crowd/start_crowd.sh", "-fg"]

